using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._ModelOnly
{
    /// <summary>
    /// <para>If Spatial Relationship Is</para>
    /// <para>Evaluates whether the inputs have a specified spatial relationship.</para>
    /// <para>评估输入是否具有指定的空间关系。</para>
    /// </summary>    
    [DisplayName("If Spatial Relationship Is")]
    public class SpatialRelationshipIfThenElse : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SpatialRelationshipIfThenElse()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features to evaluate.</para>
        /// <para>要评估的输入要素。</para>
        /// </param>
        /// <param name="_selection_condition">
        /// <para>Selection Condition</para>
        /// <para><xdoc>
        ///   <para>Specifies the selection condition that will be used for the spatial relationship between the input and selecting features.</para>
        ///   <bulletList>
        ///     <bullet_item>Exists—Checks if the spatial relationship exists between any features in the input and selecting features. This is the default.</bullet_item><para/>
        ///     <bullet_item>No Selection—Checks if the spatial relationship does not exist between any of the input and selecting features.</bullet_item><para/>
        ///     <bullet_item>All Selected—Checks if the spatial relationship exists for all features in the input features.</bullet_item><para/>
        ///     <bullet_item>Is Equal to—Checks if the number of input features with the spatial relationship is equal to the Count value.</bullet_item><para/>
        ///     <bullet_item>Is Between—Checks if the number of input features with the spatial relationship is between the Minimum Count value and Maximum Count value.</bullet_item><para/>
        ///     <bullet_item>Is Less Than—Checks if the number of input features with the spatial relationship is less than the Count value.</bullet_item><para/>
        ///     <bullet_item>Is Greater Than—Checks if the field value of the records matching the SQL expression is greater than the Count value.</bullet_item><para/>
        ///     <bullet_item>Is Not Equal to—Checks if the number of input features with the spatial relationship is not equal to the Count value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于输入要素和选择要素之间的空间关系的选择条件。</para>
        ///   <bulletList>
        ///     <bullet_item>存在 （Exists） - 检查输入要素和选择要素中的任何要素之间是否存在空间关系。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>无选择 （No Selection） - 检查任何输入要素和选择要素之间是否不存在空间关系。</bullet_item><para/>
        ///     <bullet_item>全部选定 - 检查输入要素中所有要素的空间关系是否存在。</bullet_item><para/>
        ///     <bullet_item>等于- 检查具有空间关系的输入要素的数量是否等于计数值。</bullet_item><para/>
        ///     <bullet_item>介于两者之间 （Is Between - 检查具有空间关系的输入要素的数量是否介于最小计数值和最大计数值之间。</bullet_item><para/>
        ///     <bullet_item>小于- 检查具有空间关系的输入要素的数量是否小于计数值。</bullet_item><para/>
        ///     <bullet_item>大于 - 检查与 SQL 表达式匹配的记录的字段值是否大于 Count 值。</bullet_item><para/>
        ///     <bullet_item>不等于- 检查具有空间关系的输入要素的数量是否不等于计数值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public SpatialRelationshipIfThenElse(object _in_features, _selection_condition_value _selection_condition)
        {
            this._in_features = _in_features;
            this._selection_condition = _selection_condition;
        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "If Spatial Relationship Is";

        public override string CallName => "mb.SpatialRelationshipIfThenElse";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _overlap_type.GetGPValue(), _select_features, _search_distance, _invert_spatial_relationship.GetGPValue(), _selection_condition.GetGPValue(), _count, _count_min, _count_max, _true, _false];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features to evaluate.</para>
        /// <para>要评估的输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies the spatial relationship to be evaluated.</para>
        ///   <bulletList>
        ///     <bullet_item>Intersect—The features in the input layer will be selected if they intersect a selecting feature. This is the default.</bullet_item><para/>
        ///     <bullet_item>Intersect 3D—The features in the input layer will be selected if they intersect a selecting feature in three-dimensional space (x, y, and z).</bullet_item><para/>
        ///     <bullet_item>Within a distance—The features in the input layer will be selected if they are within the specified distance (using Euclidean distance) of a selecting feature. Use the Search Distance parameter to specify the distance.</bullet_item><para/>
        ///     <bullet_item>Within a distance 3D—The features in the input layer will be selected if they are within a specified distance of a selecting feature in three-dimensional space. Use the Search Distance parameter to specify the distance.</bullet_item><para/>
        ///     <bullet_item>Within a distance geodesic—The features in the input layer will be selected if they are within a specified distance of a selecting feature. Distance between features will be calculated using a geodesic formula that takes into account the curvature of the spheroid and correctly handles data near and across the dateline and poles. Use the Search Distance parameter to specify the distance.</bullet_item><para/>
        ///     <bullet_item>Contains—The features in the input layer will be selected if they contain a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Completely contains—The features in the input layer will be selected if they completely contain a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Contains Clementini—This spatial relationship yields the same results as Completely contains with the exception that if the selecting feature is entirely on the boundary of the input feature (no part is properly inside or outside), the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</bullet_item><para/>
        ///     <bullet_item>Within—The features in the input layer will be selected if they are within a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Completely within—The features in the input layer will be selected if they are completely within or contained by a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Within Clementini—The result will be identical to Within with the exception that if the entirety of the feature in the input layer is on the boundary of the feature in the selecting layer, the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</bullet_item><para/>
        ///     <bullet_item>Are identical to—The features in the input layer will be selected if they are identical (in geometry) to a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Boundary touches—The features in the input layer will be selected if they have a boundary that touches a selecting feature. When the input features are lines or polygons, the boundary of the input feature can only touch the boundary of the selecting feature, and no part of the input feature can cross the boundary of the selecting feature.</bullet_item><para/>
        ///     <bullet_item>Share a line segment with—The features in the input layer will be selected if they share a line segment with a selecting feature. The input and selecting features must be line or polygon.</bullet_item><para/>
        ///     <bullet_item>Crossed by the outline of—The features in the input layer will be selected if they are crossed by the outline of a selecting feature. The input and selecting features must be lines or polygons. If polygons are used for the input or selecting layer, the polygon's boundary (line) will be used. Lines that cross at a point will be selected; lines that share a line segment will not be selected.</bullet_item><para/>
        ///     <bullet_item>Have their center in—The features in the input layer will be selected if their center falls within a selecting feature. The center of the feature is calculated as follows: for polygon and multipoint, the geometry's centroid is used; for line input, the geometry's midpoint is used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要评估的空间关系。</para>
        ///   <bulletList>
        ///     <bullet_item>相交—如果输入图层中的要素与选择要素相交，则将选择这些要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>相交 3D—如果输入图层中的要素与三维空间（x、y 和 z）中的选择要素相交，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>在距离内 - 如果输入图层中的要素位于选择要素的指定距离（使用欧几里得距离）内，则将选择这些要素。使用搜索距离参数指定距离。</bullet_item><para/>
        ///     <bullet_item>在距离内 3D - 如果输入图层中的要素位于三维空间中选择要素的指定距离内，则将选择这些要素。使用搜索距离参数指定距离。</bullet_item><para/>
        ///     <bullet_item>在距离测地线内 - 如果输入图层中的要素位于选择要素的指定距离内，则将选择这些要素。要素之间的距离将使用测地线公式计算，该公式考虑了椭球体的曲率，并正确处理了日期变更线和极点附近和跨日期变更线和极点的数据。使用搜索距离参数指定距离。</bullet_item><para/>
        ///     <bullet_item>包含—如果输入图层中的要素包含选择要素，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>完全包含—如果输入图层中的要素完全包含选择要素，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>包含 Clementini - 此空间关系产生的结果与“完全包含”相同，但以下情况除外：如果选择要素完全位于输入要素的边界上（没有零件位于内部或外部），则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</bullet_item><para/>
        ///     <bullet_item>内 - 如果输入图层中的要素位于选择要素内，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>完全在内—如果输入图层中的要素完全位于选择要素内或被选择要素所包含，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>在 Clementini 中 - 结果将与 Within 相同，但以下情况除外：如果输入图层中的整个要素位于选择图层中要素的边界上，则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</bullet_item><para/>
        ///     <bullet_item>相同于—如果输入图层中的要素与选择要素相同（几何中），则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>边界接触 - 如果输入图层中的要素具有与选择要素相接触的边界，则将选择这些要素。当输入要素为直线或面时，输入要素的边界只能与选择要素的边界接触，输入要素的任何部分都不能越过选择要素的边界。</bullet_item><para/>
        ///     <bullet_item>共享线段 - 如果输入图层中的要素与选择要素共享线段，则将选择这些要素。输入要素和选择要素必须为直线或面。</bullet_item><para/>
        ///     <bullet_item>与轮廓相交 - 如果输入图层中的要素与所选要素的轮廓相交，则将选择这些要素。输入要素和选择要素必须为直线或面。如果将面用于输入图层或选择图层，则将使用面的边界（线）。将选择在某个点交叉的线;不会选择共享线段的线。</bullet_item><para/>
        ///     <bullet_item>中心位于输入图层中 - 如果输入图层中的要素中心位于选择要素内，则将选择输入图层中的要素。要素的中心计算如下：对于面和多点，使用几何的质心;对于线输入，使用几何图形的中点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Relationship")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _overlap_type_value _overlap_type { get; set; } = _overlap_type_value._INTERSECT;

        public enum _overlap_type_value
        {
            /// <summary>
            /// <para>Intersect</para>
            /// <para>Intersect—The features in the input layer will be selected if they intersect a selecting feature. This is the default.</para>
            /// <para>相交—如果输入图层中的要素与选择要素相交，则将选择这些要素。这是默认设置。</para>
            /// </summary>
            [Description("Intersect")]
            [GPEnumValue("INTERSECT")]
            _INTERSECT,

            /// <summary>
            /// <para>Intersect 3D</para>
            /// <para>Intersect 3D—The features in the input layer will be selected if they intersect a selecting feature in three-dimensional space (x, y, and z).</para>
            /// <para>相交 3D—如果输入图层中的要素与三维空间（x、y 和 z）中的选择要素相交，则将选择这些要素。</para>
            /// </summary>
            [Description("Intersect 3D")]
            [GPEnumValue("INTERSECT_3D")]
            _INTERSECT_3D,

            /// <summary>
            /// <para>Within a distance geodesic</para>
            /// <para>Within a distance geodesic—The features in the input layer will be selected if they are within a specified distance of a selecting feature. Distance between features will be calculated using a geodesic formula that takes into account the curvature of the spheroid and correctly handles data near and across the dateline and poles. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离测地线内 - 如果输入图层中的要素位于选择要素的指定距离内，则将选择这些要素。要素之间的距离将使用测地线公式计算，该公式考虑了椭球体的曲率，并正确处理了日期变更线和极点附近和跨日期变更线和极点的数据。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within a distance geodesic")]
            [GPEnumValue("WITHIN_A_DISTANCE_GEODESIC")]
            _WITHIN_A_DISTANCE_GEODESIC,

            /// <summary>
            /// <para>Within a distance</para>
            /// <para>Within a distance—The features in the input layer will be selected if they are within the specified distance (using Euclidean distance) of a selecting feature. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离内 - 如果输入图层中的要素位于选择要素的指定距离（使用欧几里得距离）内，则将选择这些要素。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within a distance")]
            [GPEnumValue("WITHIN_A_DISTANCE")]
            _WITHIN_A_DISTANCE,

            /// <summary>
            /// <para>Within a distance 3D</para>
            /// <para>Within a distance 3D—The features in the input layer will be selected if they are within a specified distance of a selecting feature in three-dimensional space. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离内 3D - 如果输入图层中的要素位于三维空间中选择要素的指定距离内，则将选择这些要素。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within a distance 3D")]
            [GPEnumValue("WITHIN_A_DISTANCE_3D")]
            _WITHIN_A_DISTANCE_3D,

            /// <summary>
            /// <para>Contains</para>
            /// <para>Contains—The features in the input layer will be selected if they contain a selecting feature.</para>
            /// <para>包含—如果输入图层中的要素包含选择要素，则将选择这些要素。</para>
            /// </summary>
            [Description("Contains")]
            [GPEnumValue("CONTAINS")]
            _CONTAINS,

            /// <summary>
            /// <para>Completely contains</para>
            /// <para>Completely contains—The features in the input layer will be selected if they completely contain a selecting feature.</para>
            /// <para>完全包含—如果输入图层中的要素完全包含选择要素，则将选择这些要素。</para>
            /// </summary>
            [Description("Completely contains")]
            [GPEnumValue("COMPLETELY_CONTAINS")]
            _COMPLETELY_CONTAINS,

            /// <summary>
            /// <para>Contains Clementini</para>
            /// <para>Contains Clementini—This spatial relationship yields the same results as Completely contains with the exception that if the selecting feature is entirely on the boundary of the input feature (no part is properly inside or outside), the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</para>
            /// <para>包含 Clementini - 此空间关系产生的结果与“完全包含”相同，但以下情况除外：如果选择要素完全位于输入要素的边界上（没有零件位于内部或外部），则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</para>
            /// </summary>
            [Description("Contains Clementini")]
            [GPEnumValue("CONTAINS_CLEMENTINI")]
            _CONTAINS_CLEMENTINI,

            /// <summary>
            /// <para>Within</para>
            /// <para>Within a distance—The features in the input layer will be selected if they are within the specified distance (using Euclidean distance) of a selecting feature. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离内 - 如果输入图层中的要素位于选择要素的指定距离（使用欧几里得距离）内，则将选择这些要素。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within")]
            [GPEnumValue("WITHIN")]
            _WITHIN,

            /// <summary>
            /// <para>Completely within</para>
            /// <para>Completely within—The features in the input layer will be selected if they are completely within or contained by a selecting feature.</para>
            /// <para>完全在内—如果输入图层中的要素完全位于选择要素内或被选择要素所包含，则将选择这些要素。</para>
            /// </summary>
            [Description("Completely within")]
            [GPEnumValue("COMPLETELY_WITHIN")]
            _COMPLETELY_WITHIN,

            /// <summary>
            /// <para>Within Clementini</para>
            /// <para>Within Clementini—The result will be identical to Within with the exception that if the entirety of the feature in the input layer is on the boundary of the feature in the selecting layer, the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</para>
            /// <para>在 Clementini 中 - 结果将与 Within 相同，但以下情况除外：如果输入图层中的整个要素位于选择图层中要素的边界上，则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</para>
            /// </summary>
            [Description("Within Clementini")]
            [GPEnumValue("WITHIN_CLEMENTINI")]
            _WITHIN_CLEMENTINI,

            /// <summary>
            /// <para>Are identical to</para>
            /// <para>Are identical to—The features in the input layer will be selected if they are identical (in geometry) to a selecting feature.</para>
            /// <para>相同于—如果输入图层中的要素与选择要素相同（几何中），则将选择这些要素。</para>
            /// </summary>
            [Description("Are identical to")]
            [GPEnumValue("ARE_IDENTICAL_TO")]
            _ARE_IDENTICAL_TO,

            /// <summary>
            /// <para>Boundary touches</para>
            /// <para>Boundary touches—The features in the input layer will be selected if they have a boundary that touches a selecting feature. When the input features are lines or polygons, the boundary of the input feature can only touch the boundary of the selecting feature, and no part of the input feature can cross the boundary of the selecting feature.</para>
            /// <para>边界接触 - 如果输入图层中的要素具有与选择要素相接触的边界，则将选择这些要素。当输入要素为直线或面时，输入要素的边界只能与选择要素的边界接触，输入要素的任何部分都不能越过选择要素的边界。</para>
            /// </summary>
            [Description("Boundary touches")]
            [GPEnumValue("BOUNDARY_TOUCHES")]
            _BOUNDARY_TOUCHES,

            /// <summary>
            /// <para>Share a line segment with</para>
            /// <para>Share a line segment with—The features in the input layer will be selected if they share a line segment with a selecting feature. The input and selecting features must be line or polygon.</para>
            /// <para>共享线段 - 如果输入图层中的要素与选择要素共享线段，则将选择这些要素。输入要素和选择要素必须为直线或面。</para>
            /// </summary>
            [Description("Share a line segment with")]
            [GPEnumValue("SHARE_A_LINE_SEGMENT_WITH")]
            _SHARE_A_LINE_SEGMENT_WITH,

            /// <summary>
            /// <para>Crossed by the outline of</para>
            /// <para>Crossed by the outline of—The features in the input layer will be selected if they are crossed by the outline of a selecting feature. The input and selecting features must be lines or polygons. If polygons are used for the input or selecting layer, the polygon's boundary (line) will be used. Lines that cross at a point will be selected; lines that share a line segment will not be selected.</para>
            /// <para>与轮廓相交 - 如果输入图层中的要素与所选要素的轮廓相交，则将选择这些要素。输入要素和选择要素必须为直线或面。如果将面用于输入图层或选择图层，则将使用面的边界（线）。将选择在某个点交叉的线;不会选择共享线段的线。</para>
            /// </summary>
            [Description("Crossed by the outline of")]
            [GPEnumValue("CROSSED_BY_THE_OUTLINE_OF")]
            _CROSSED_BY_THE_OUTLINE_OF,

            /// <summary>
            /// <para>Have their center in</para>
            /// <para>Have their center in—The features in the input layer will be selected if their center falls within a selecting feature. The center of the feature is calculated as follows: for polygon and multipoint, the geometry's centroid is used; for line input, the geometry's midpoint is used.</para>
            /// <para>中心位于输入图层中 - 如果输入图层中的要素中心位于选择要素内，则将选择输入图层中的要素。要素的中心计算如下：对于面和多点，使用几何的质心;对于线输入，使用几何图形的中点。</para>
            /// </summary>
            [Description("Have their center in")]
            [GPEnumValue("HAVE_THEIR_CENTER_IN")]
            _HAVE_THEIR_CENTER_IN,

        }

        /// <summary>
        /// <para>Selecting Features</para>
        /// <para>The features in the Input Features parameter will be selected based on their relationship to the features from this layer or feature class.</para>
        /// <para>输入要素参数中的要素将根据其与此图层或要素类中的要素的关系进行选择。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Selecting Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _select_features { get; set; } = null;


        /// <summary>
        /// <para>Search Distance</para>
        /// <para><xdoc>
        ///   <para>The distance that will be searched. This parameter is only valid if the Relationship parameter is set to Within a distance, Within a distance geodesic, Within a distance 3D, Intersect, Intersect 3D, Have their center in, or Contains.</para>
        ///   <para>If the Within a distance geodesic option is selected, use a linear unit such as kilometers or miles.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将搜索的距离。仅当“关系”参数设置为“在距离内”、“在距离测地线内”、“距离 3D 内”、“相交”、“相交 3D”、“有其中心”或“包含”时，此参数才有效。</para>
        ///   <para>如果选择了距离内测地线选项，请使用线性单位，例如千米或英里。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_distance { get; set; } = null;


        /// <summary>
        /// <para>Invert spatial relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the spatial relationship evaluation result or the opposite result will be used. For example, this parameter can be used to get a list of features that do not intersect or are not within a given distance of features in another dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The query result will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The opposite of the query result will be used. If the Selection Type parameter is used, the reversal of the selection occurs before it is combined with existing selections.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是使用空间关系评估结果还是相反结果。例如，此参数可用于获取与另一个数据集中的要素不相交或不在给定距离内的要素列表。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 将使用查询结果。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 将使用与查询结果相反的查询结果。如果使用“选择类型”参数，则在将选择内容与现有选择组合之前，将发生选择的反转。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Invert spatial relationship")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _invert_spatial_relationship_value _invert_spatial_relationship { get; set; } = _invert_spatial_relationship_value._false;

        public enum _invert_spatial_relationship_value
        {
            /// <summary>
            /// <para>INVERT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INVERT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NOT_INVERT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NOT_INVERT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Selection Condition</para>
        /// <para><xdoc>
        ///   <para>Specifies the selection condition that will be used for the spatial relationship between the input and selecting features.</para>
        ///   <bulletList>
        ///     <bullet_item>Exists—Checks if the spatial relationship exists between any features in the input and selecting features. This is the default.</bullet_item><para/>
        ///     <bullet_item>No Selection—Checks if the spatial relationship does not exist between any of the input and selecting features.</bullet_item><para/>
        ///     <bullet_item>All Selected—Checks if the spatial relationship exists for all features in the input features.</bullet_item><para/>
        ///     <bullet_item>Is Equal to—Checks if the number of input features with the spatial relationship is equal to the Count value.</bullet_item><para/>
        ///     <bullet_item>Is Between—Checks if the number of input features with the spatial relationship is between the Minimum Count value and Maximum Count value.</bullet_item><para/>
        ///     <bullet_item>Is Less Than—Checks if the number of input features with the spatial relationship is less than the Count value.</bullet_item><para/>
        ///     <bullet_item>Is Greater Than—Checks if the field value of the records matching the SQL expression is greater than the Count value.</bullet_item><para/>
        ///     <bullet_item>Is Not Equal to—Checks if the number of input features with the spatial relationship is not equal to the Count value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于输入要素和选择要素之间的空间关系的选择条件。</para>
        ///   <bulletList>
        ///     <bullet_item>存在 （Exists） - 检查输入要素和选择要素中的任何要素之间是否存在空间关系。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>无选择 （No Selection） - 检查任何输入要素和选择要素之间是否不存在空间关系。</bullet_item><para/>
        ///     <bullet_item>全部选定 - 检查输入要素中所有要素的空间关系是否存在。</bullet_item><para/>
        ///     <bullet_item>等于- 检查具有空间关系的输入要素的数量是否等于计数值。</bullet_item><para/>
        ///     <bullet_item>介于两者之间 （Is Between - 检查具有空间关系的输入要素的数量是否介于最小计数值和最大计数值之间。</bullet_item><para/>
        ///     <bullet_item>小于- 检查具有空间关系的输入要素的数量是否小于计数值。</bullet_item><para/>
        ///     <bullet_item>大于 - 检查与 SQL 表达式匹配的记录的字段值是否大于 Count 值。</bullet_item><para/>
        ///     <bullet_item>不等于- 检查具有空间关系的输入要素的数量是否不等于计数值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Selection Condition")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _selection_condition_value _selection_condition { get; set; }

        public enum _selection_condition_value
        {
            /// <summary>
            /// <para>Exists</para>
            /// <para>Exists—Checks if the spatial relationship exists between any features in the input and selecting features. This is the default.</para>
            /// <para>存在 （Exists） - 检查输入要素和选择要素中的任何要素之间是否存在空间关系。这是默认设置。</para>
            /// </summary>
            [Description("Exists")]
            [GPEnumValue("EXISTS")]
            _EXISTS,

            /// <summary>
            /// <para>No Selection</para>
            /// <para>No Selection—Checks if the spatial relationship does not exist between any of the input and selecting features.</para>
            /// <para>无选择 （No Selection） - 检查任何输入要素和选择要素之间是否不存在空间关系。</para>
            /// </summary>
            [Description("No Selection")]
            [GPEnumValue("NO_SELECTION")]
            _NO_SELECTION,

            /// <summary>
            /// <para>All Selected</para>
            /// <para>All Selected—Checks if the spatial relationship exists for all features in the input features.</para>
            /// <para>全部选定 - 检查输入要素中所有要素的空间关系是否存在。</para>
            /// </summary>
            [Description("All Selected")]
            [GPEnumValue("ALL_SELECTED")]
            _ALL_SELECTED,

            /// <summary>
            /// <para>Is Equal to</para>
            /// <para>Is Equal to—Checks if the number of input features with the spatial relationship is equal to the Count value.</para>
            /// <para>等于- 检查具有空间关系的输入要素的数量是否等于计数值。</para>
            /// </summary>
            [Description("Is Equal to")]
            [GPEnumValue("IS_EQUAL_TO")]
            _IS_EQUAL_TO,

            /// <summary>
            /// <para>Is Between</para>
            /// <para>Is Between—Checks if the number of input features with the spatial relationship is between the Minimum Count value and Maximum Count value.</para>
            /// <para>介于两者之间 （Is Between - 检查具有空间关系的输入要素的数量是否介于最小计数值和最大计数值之间。</para>
            /// </summary>
            [Description("Is Between")]
            [GPEnumValue("IS_BETWEEN")]
            _IS_BETWEEN,

            /// <summary>
            /// <para>Is Less Than</para>
            /// <para>Is Less Than—Checks if the number of input features with the spatial relationship is less than the Count value.</para>
            /// <para>小于- 检查具有空间关系的输入要素的数量是否小于计数值。</para>
            /// </summary>
            [Description("Is Less Than")]
            [GPEnumValue("IS_LESS_THAN")]
            _IS_LESS_THAN,

            /// <summary>
            /// <para>Is Greater Than</para>
            /// <para>Is Greater Than—Checks if the field value of the records matching the SQL expression is greater than the Count value.</para>
            /// <para>大于 - 检查与 SQL 表达式匹配的记录的字段值是否大于 Count 值。</para>
            /// </summary>
            [Description("Is Greater Than")]
            [GPEnumValue("IS_GREATER_THAN")]
            _IS_GREATER_THAN,

            /// <summary>
            /// <para>Is Not Equal to</para>
            /// <para>Is Not Equal to—Checks if the number of input features with the spatial relationship is not equal to the Count value.</para>
            /// <para>不等于- 检查具有空间关系的输入要素的数量是否不等于计数值。</para>
            /// </summary>
            [Description("Is Not Equal to")]
            [GPEnumValue("IS_NOT_EQUAL_TO")]
            _IS_NOT_EQUAL_TO,

        }

        /// <summary>
        /// <para>Count</para>
        /// <para>The integer count value.</para>
        /// <para>整数计数值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Count")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _count { get; set; } = 0;


        /// <summary>
        /// <para>Minimum Count</para>
        /// <para>The minimum integer count value.</para>
        /// <para>最小整数计数值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Count")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _count_min { get; set; } = 0;


        /// <summary>
        /// <para>Maximum Count</para>
        /// <para>The maximum integer count value.</para>
        /// <para>最大整数计数值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Count")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _count_max { get; set; } = 0;


        /// <summary>
        /// <para>True</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("True")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _true { get; set; }


        /// <summary>
        /// <para>False</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("False")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _false { get; set; }


        public SpatialRelationshipIfThenElse SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}